<template>
	<view class="bg_color">
		<!-- #ifndef  H5 -->
		<u-navbar back-text="返回" :title="detail.name"></u-navbar>
		<!-- #endif -->
		<view class="u-content">
			<u-parse :html="detail.content"></u-parse>
		</view>
	</view>

</template>

<script>
	var that;
	var vk;
	export default {
		data() {
			return {
				detail: []
			}
		},
		onLoad(options) {

			that = this;
			vk = that.vk;
			if (!options._id) {
				vk.toast('新闻不存在');
				return;
			}
			that.$api.newsDetail({
				_id: options._id
			}).then((data) => {
				if (data.code == 0) {
					that.detail = data.detail
				} else {
					vk.toast('网络开小差了~')
				}
			}).catch((err) => {})
		},
		methods: {

		}
	}
</script>

<style lang="scss" scoped>
	.u-content {
		padding: 30rpx 20rpx;
	}
</style>
